#ifndef __GPIO_H_
#define __GPIO_H_

#define CNUM_LEN	32
#define PATH_LEN	1024

struct gpiodev {
	int 
		num;
	char
		cnum[CNUM_LEN];
	char
		path_direction[PATH_LEN];
	char
		path_value[PATH_LEN];
};

extern struct gpiodev* 
	gpiodev_construct(
		int gpionum);

extern void 
	gpiodev_deconstruct(
		struct gpiodev *dev);

extern int 
	gpiodev_export(
		struct gpiodev *dev);

extern int
	gpiodev_unexport(
		struct gpiodev *dev);

extern int
	gpiodev_setdir(
		struct gpiodev *dev, int dir);

extern int 
	gpiodev_setval(
		struct gpiodev *dev, int val);

extern int
	gpiodev_getval(
		struct gpiodev *dev);

#endif
